import request from '@/utils/request'
//前后端方法交互
export default{
  // 从后端获取用户信息给前端
  getUserList(searchModel){
    return request({
      url:'/user/list',
      method: 'get',
      params:{
        pageNo:searchModel.pageNo,
        pageSize:searchModel.pageSize,
        username:searchModel.username,
        phone:searchModel.phone
      }
    });
  },
  // 前端添加用户信息到后端
  addUser(user){
    return request({
      url:'/user',
      method: 'post',
      data:user
    });
  },
}